writting css with twin.macro and styled components

117

import tw, { css } from 'twin.macro'
// maybe import css form 'styled components'

const hoverStyles = css`
  &:hover {
    border-color: black;
    ${tw`text-black`}
  }
`
const Input = ({ hasHover }) => (
  <input css={[tw`border`, hasHover && hoverStyles]} />
)

Comments

Submit
0 Comments